﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManagerPaperInfo.aspx.cs"
    Inherits="sysadmin_QuestionManager_ManagerPaperInfo" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>管理试卷</title>
    <link href="../../css/1/css/css.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" language="javascript">
        function ShowNo()                        //隐藏两个层
        {
            document.getElementById("doing").style.display="none";
            document.getElementById("divLogin").style.display="none";
        }
        function $(id)         
        {
            return (document.getElementById) ? document.getElementById(id) : document.all[id] ;
        }
        function showFloat()                    //根据屏幕的大小显示两个层
        {
            var range = getRange();
            $('doing').style.width = range.width + "px";
            $('doing').style.height = range.height + "px";
            $('doing').style.display = "block";
            document.getElementById("divLogin").style.display="";
        }
        function getRange()                      //得到屏幕的大小
        {
              var top     = document.body.scrollTop;
              var left    = document.body.scrollLeft;
              var height  = document.body.clientHeight;
              var width   = document.body.clientWidth;

              if (top==0 && left==0 && height==0 && width==0) 
              {
                top     = document.documentElement.scrollTop;
                left    = document.documentElement.scrollLeft;
                height  = document.documentElement.clientHeight;
                width   = document.documentElement.clientWidth;
              }
              return  {top:top  ,left:left ,height:height ,width:width } ;
        } 

    </script>

</head>
<body class="bodymain">
    <form id="form1" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" class="tree-titbg_right" width="100%">
            <tr>
                <td class="tree-titbg_left">
                    <asp:Label ID="lab_TitleInfo" runat="server" Text="管理试卷"></asp:Label></td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="btnbg">
            <tr>
                <td>
                    <asp:CheckBox ID="chkAll" runat="server" Text="全选/取消" OnCheckedChanged="chkAll_CheckedChanged"
                        AutoPostBack="True" ValidationGroup="gs" />
                    <asp:CheckBox ID="chkCancel" runat="server" Text="反选" OnCheckedChanged="chkCancel_CheckedChanged"
                        AutoPostBack="True" ValidationGroup="gs" />&nbsp;
                    <asp:Button ID="btnDel" runat="server" Text="" CssClass="inputBotton2" OnClick="btnDel_Click" />
                    
                    </td>
                <td  align="right">
                    <asp:TextBox ID="txt_SearchKey" runat="server"></asp:TextBox>
                    <asp:Button ID="btn_SortSearch" runat="server" Text="搜索" CssClass="inputBotton2" OnClick="btn_SortSearch_Click" />&nbsp;
                    <a href="javascript:void(0)" onclick="showFloat()"><%=GetLanageValueByKey("btn_ManagerQuestion_highSearch", PowerCreator.LMS.Language.LanagetItemType.Page) %></a>&nbsp;
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvPaperList" runat="server" AutoGenerateColumns="False" OnRowCommand="gvPaperList_RowCommand"
            OnRowDataBound="gvPaperList_RowDataBound" GridLines="None" BorderWidth="0px"
            CssClass="mainList" Width="100%" AllowSorting="True" OnSorting="GridView1_Sorting" >
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server" />
                        <asp:Label ID="lab_PaperID" runat="server" Text='<%#Eval("PaperID") %>' Visible="False"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="PaperID" HeaderText="试卷ID" Visible="False" />
                <asp:BoundField DataField="Index" HeaderText="试卷编号" Visible="False" />
                <asp:BoundField DataField="PaperName" HeaderText="试卷名称" />
                <asp:BoundField DataField="PaperTestTime" HeaderText="测试时长(单位/分钟)" SortExpression="PaperTestTime" />
                <asp:BoundField DataField="PaperScore" HeaderText="试卷总分" SortExpression="PaperScore" />
                <asp:BoundField DataField="PaperPassScore" HeaderText="默认通过分数" SortExpression="PaperPassScore" />
                <asp:BoundField DataField="PaperType" HeaderText="试卷类型" SortExpression="PaperType"/>
                <asp:BoundField DataField="SelectTypeNew" HeaderText="选题方式"   SortExpression="PaperSelectType"/>
                
                
                <asp:BoundField DataField="PaperBuildState" HeaderText="试卷状态" SortExpression="PaperBuildState"/>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="ibtnEditor" runat="server" CommandName="myeditor" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "url") %>'>修改试卷基本信息</asp:LinkButton>
                        &nbsp;&nbsp;
                        <asp:LinkButton ID="ibtnPreview" runat="server" CommandName="mypreview" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "url") %>'>预览试卷</asp:LinkButton>
                        &nbsp;&nbsp;
                        <asp:LinkButton ID="ibtnDelete" runat="server" CommandArgument='<%#Eval("PaperID") %>'
                            CommandName="mydelete" >删除</asp:LinkButton>
                        &nbsp;&nbsp;
                        <asp:LinkButton ID="btn_Out" CommandName="btn_Out" runat="server" CommandArgument='<%#Eval("PaperID") %>'>导出Word</asp:LinkButton>
                        &nbsp;&nbsp;
                        <asp:LinkButton ID="btn_SetUser" CommandName="btn_SetUser" runat="server" CommandArgument='<%#Eval("PaperID") %>'
                            Visible="false">设置参加人员</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <%=GetLanageValueByKey("NoContent_msg", PowerCreator.LMS.Language.LanagetItemType.Page)%>
            </EmptyDataTemplate>
        </asp:GridView>
        &nbsp;
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="Center" OnPageChanged="AspNetPager1_PageChanged"
                        ShowCustomInfoSection="Left" Width="100%" meta:resourceKey="AspNetPager1" Style="font-size: 14px"
                        InputBoxStyle="width:19px" CustomInfoHTML="当前页  <font color='red'><b>%CurrentPageIndex%</b></font> 总页数  %PageCount%  当前条数 %StartRecordIndex%-%EndRecordIndex%"
                        FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PrevPageText="上一页">
                    </webdiyer:AspNetPager>
                </td>
            </tr>
        </table>
        <div id="doing" style="filter: alpha(opacity=30); -moz-opacity: 0.3; opacity: 0.3;
            background-color: #000; width: 100%; height: 100%; z-index: 1000; position: absolute;
            left: 0; top: 0; display: none; overflow: hidden;">
        </div>
        <div id="divLogin" style="border: solid 10px #898989; background: #fff; padding: 10px;
            width: 780px; z-index: 1001; position: absolute; display: none; top: 50%; left: 50%;
            margin: -200px 0 0 -400px;">
            <div style="padding: 3px 15px 3px 15px; text-align: left; vertical-align: middle;">
                <table border="0" cellpadding="0" cellspacing="0" class="tableList2" width="100%">
                    <tr>
                        <th>
                            <asp:Label ID="lab_SelectType" runat="server" Text="选题方式"></asp:Label></th>
                        <td>
                            <asp:DropDownList ID="dpdlst_SelectType" runat="server">
                                <asp:ListItem Value="-1">请选择</asp:ListItem>
                                <asp:ListItem Value="1">手工选题</asp:ListItem>
                                <asp:ListItem Value="2">自动选题</asp:ListItem>
                            </asp:DropDownList></td>
                        <th>
                            <asp:Label ID="lab_PaperType" runat="server" Text="试卷类型"></asp:Label></th>
                        <td>
                            <asp:DropDownList ID="dpdlst_PaperType" runat="server">
                                <asp:ListItem Value="-1">请选择</asp:ListItem>
                                <asp:ListItem Value="0">普通试卷</asp:ListItem>
                                <asp:ListItem Value="1">测试试卷</asp:ListItem>
                            </asp:DropDownList></td>
                      
                    </tr>
                      <th>
                            <asp:Label ID="lab_PaperState" runat="server" Text="试卷状态"></asp:Label></th>
                        <td>
                            <asp:DropDownList ID="dpdlst_PaperState" runat="server">
                                <asp:ListItem Value="-1">请选择</asp:ListItem>
                                <asp:ListItem Value="0">未生成</asp:ListItem>
                                <asp:ListItem Value="1">已生成</asp:ListItem>
                            </asp:DropDownList></td>
                        <th>
                            <asp:Label ID="lab_PaperName" runat="server" Text="试卷名称"></asp:Label></th>
                        <td colspan="3">
                            <asp:TextBox ID="txtPaperName" runat="server"></asp:TextBox>&nbsp;
                           </td>
                    <tr>
                        <td colspan="8" class="tree-bottom-bg"> <asp:Button ID="btnSearch" runat="server" CssClass="inputBotton2" Text=" 搜 索 " OnClick="btnSearch_Click" />
                            <input id="btn_colse" class="inputBotton2" onclick="ShowNo();" type="button" value='<%=GetLanageValueByKey("btn_ManagerQuestion_Close", PowerCreator.LMS.Language.LanagetItemType.Page) %>' /></td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
</body>
</html>
